<template>
    <div class="container">
        home
    </div>
</template>

<script lang="ts">
import { generateRoutes } from "@/router";
import { Component, Vue } from "vue-property-decorator";
@Component({
    name: "home",
    components: {},
})
export default class extends Vue {
    mounted() {
        const routes = generateRoutes();
        if (routes.length > 0) {
            let nowRoutes: any = null;
            let firstRoute: any = null;
            firstRoute = routes[0];

            if (firstRoute && firstRoute.children && firstRoute.children.length > 0) {
                nowRoutes = firstRoute.children[0];
            } else {
                nowRoutes = firstRoute;
            }
            this.$nextTick(() => {
                this.$router.replace({ name: nowRoutes.name });
            });
        }
    }
}
</script>
<style scoped lang="scss"></style>
